import os


def walk_pyc(path = '.'):
    pyc_name_list = []
    for dirpath, _, filenames in os.walk(path):
        for name in filenames:
            # fullname = ''.join([dirpath, name])
            fullname =os.path.join(dirpath, name)
            _, tail = os.path.splitext(fullname)
            if tail == '.pyc':
                pyc_name_list.append(fullname)
            else:
                pass
    return pyc_name_list